<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div01">
			<p>内容1</p>
			<p>内容</p>
		</div>
		<input id="input1" type="text"/>
		<input type="button" onclick="add()" value="添加"/>
		
		<script>
			function add()
			{
				var tmpP = document.createElement("p")
				var txtNode = document.createTextNode(input1.value);
				tmpP.appendChild(txtNode);
				div01.appendChild(tmpP)
			}
		</script>
	</body>
</html>
